/*
 Navicat MySQL Data Transfer

 Source Server         : localhost
 Source Server Version : 50163
 Source Host           : localhost
 Source Database       : mybook

 Target Server Version : 50163
 File Encoding         : utf-8

 Date: 04/27/2015 09:27:24 AM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `catogery`
-- ----------------------------
DROP TABLE IF EXISTS `catogery`;
CREATE TABLE `catogery` (
  `id` int(11) NOT NULL,
  `name` varchar(32) NOT NULL,
  `type` varchar(32) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `catogery`
-- ----------------------------
BEGIN;
INSERT INTO `catogery` VALUES ('101', '生活', '支'), ('102', '娱乐', '支'), ('103', '学习', '支'), ('201', '固定生活费', '收'), ('202', '额外收入', '收');
COMMIT;

-- ----------------------------
--  Table structure for `detail`
-- ----------------------------
DROP TABLE IF EXISTS `detail`;
CREATE TABLE `detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(32) NOT NULL,
  `catogeryId` int(11) NOT NULL,
  `remark` varchar(255) NOT NULL,
  `amount` int(11) NOT NULL,
  `recordDate` date NOT NULL,
  `userId` int(11) NOT NULL,
  `createTime` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `loginName` varchar(32) NOT NULL,
  `password` varchar(32) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `user`
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('1', 'u1', '123'), ('2', 'u2', '123');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
